package com.bhs.mappers.menu;

import com.bhs.pojo.Item;
import com.bhs.pojo.TopMenu;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface TopMenuMapper {
    @Select("select id,name,created,updated from top_menu")
    List<TopMenu> findTopMenu();

    @Select("SELECT " +
            "id,menu_id,NAME,price,img_path,created,updated,STATUS,top_menu_id,repertory " +
            "FROM item " +
            "WHERE top_menu_id=#{id} and status=2")
    List<Item> findTopItem(Integer id);
}
